@extends('layout.admin')

@section('content')
	
	<div class="clearfix"></div>
  <div class="panel-head"><strong class="icon-reorder"> 修改分类</strong></div>
	<div class="col-md-12" style='margin-top:50px'>
  @if(count($errors)>0)
      <div class="alert alert-info">
                @foreach($errors->all() as $error) 
                <li>
                <img src="/admins/images/info.png" alt="">&nbsp;
                {{$error}}</li>
                @endforeach
      </div>
 @endif

		<form class="form-horizontal" role="form" action='/admin/cate/update' method='get' enctype='multipart/form-data'>
  			<div class="col-md-8">
            <div class="form-group" style='margin-bottom:20px'>
        			<label for="inputEmail3" class="col-md-2 control-label">分类名称</label>
        			<div class="col-md-10">
          				<input type="text" name='name' class="form-control"  placeholder="请填写您修改的商品" value='{{$info->name}}'>
        			</div>
      			</div>
  		
            <div class="form-group" style='margin-top:20px'>
              <div class="form-group" style='margin-bottom:20px'>
                <label for="inputEmail3" class="col-md-2 control-label">分类标题</label>
                <div class='col-md-10'>
                    <select name="pid" class="input w70">
                      <option value="0">请选择分类</option>
                       @foreach($cates as $k=>$v)
                      <option value="{{$v->id}}" @if($v->id == $info->pid) selected @endif>{{$v->name}}</option>
                       @endforeach
                    </select>
                </div>
              </div>
          <!-- <div class="field"> 
           <label>分类标题：</label>
            <select name="pid" class="input w70">
              <option value="0">请选择分类</option>
               @foreach($cates as $k=>$v)
              <option value="{{$v->id}}" @if($v->id == $info->pid) selected @endif>{{$v->name}}</option>
               @endforeach
            </select>
            <div class="tips" title=""></div>
          </div> -->
             </div>
  	 		
      			<div class="mws-button-row" style='margin-left:300px '>
          	   {{csrf_field()}}
          	   		<input type="hidden" name='id' value="{{$info->id}}">
          			<input value="修改"  class="btn btn-danger" type="submit" style='margin-right:30px'>
          			<!-- <input value="重置" class="btn " type="reset"> -->
      			</div>
        </div>
		</form>
	</div>


@endsection